package com.czxy.client;

import com.czxy.pojo.User;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;

/**
 * @author Liuyunqin 17674029449@163.com
 * @date 2018/12/17 17:36
 */
@Component
public class UserClientFallback implements UserClient{

    /**
     * 熔断
     * @param mobile
     * @param password
     * @return
     */
    @Override
    public ResponseEntity<User> findUserByMobile(String mobile, String password) {
        User user = new User();
        user.setId(-100);
        return ResponseEntity.ok(user);
    }
}
